package com.google.code.irouter.portal.client.dashboard.main.center.managers.relation.browser;

import com.google.code.irouter.portal.client.dashboard.main.center.managers.relation.browser.editor.Detail;
import com.google.code.irouter.portal.client.dashboard.main.center.managers.relation.browser.editor.detail.Consumer;
import com.google.code.irouter.portal.client.dashboard.main.center.managers.relation.browser.editor.detail.Guide;
import com.google.code.irouter.portal.client.dashboard.main.center.managers.relation.browser.editor.detail.command.Name;
import com.gwtext.client.core.Ext;
import com.gwtext.client.core.RegionPosition;
import com.gwtext.client.widgets.Panel;
import com.gwtext.client.widgets.layout.BorderLayout;
import com.gwtext.client.widgets.layout.BorderLayoutData;

public final class Editor extends Panel {

	public Editor() {
		super();
		this.setId(Editor.class.getName());

		BorderLayoutData detailLayout = new BorderLayoutData(RegionPosition.CENTER);
		detailLayout.setMargins(0, 5, 5, 5);

		this.setLayout(new BorderLayout());
		this.setBorder(false);
		this.add(new Detail(), detailLayout);
	}
	
	public void reset() {
		((Name) Ext.getCmp(Name.class.getName())).reset();
		((Guide) Ext.getCmp(Guide.class.getName())).reset();
		((Consumer) Ext.getCmp(Consumer.class.getName())).reset();
	}

}
